<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
      <link rel="stylesheet" type="text/css" href="../../css/aui.css">
  </head>
  <body style="background-color:#fff;width:100%;height:500px;">
    <header class="aui-bar aui-bar-nav">
        <!-- <a href="" class="aui-pull-left"><span class="aui-iconfont aui-icon-left" tapmode onclick="api.closeWin()"></span></a>
        <div class="aui-title">我的资产</div> -->
        <div style="width: 100%;height:3rem;background-color: #f7911b;text-align: center;position: fixed;margin-top: -0.1rem;">
          <span class="aui-iconfont aui-icon-left aui-pull-left" onclick="api.closeWin()"></span>  
          <span style="float: left;margin-left: 6rem;" >账户余额</span>   
        </div>

</header>
    <div class="myassets_div" >
    <div class="myassets_yue">
      <span class="myassets_yue_now">您当前集分宝账户余额</span>
      <span class="myassets_yue_note"tapmode onclick="opentrading_record()" >交易记录</span>
      <div class="myassets_yue_num" class="assets-typlic-number" id="CanClaim" style="text-align:center;float: left;margin-left: 7.5rem;" ><span style='font-size:1rem;color: #ff1e1e;'>查询中……</span></div>
      <button class="myassets_yue_but"  tapmode onclick="openApply()">提现</button>
    </div>
    <div class="myassets_yue_mk">
      <span class="myassets_yue_mk1" >您当前芒客币账户余额</span>
      <span class="myassets_yue_mk_notes" tapmode onclick="opentrading_record1()" >交易记录</span>
      <div class="assets-typlic-number" id="integral"  style="font-size:2rem;color: #ff1e1e;margin: 0.3rem 6.5rem;float:left;text-align: center;"><span style='font-size:20px'>查询中……</span></div>
    </div>
    <div class="myassets_yue_shop" >
      <span style="font-family: SimHei;font-size:0.8rem;margin-left: 1rem;margin-top:0.5rem;float: left;">您已累计通过芒客购物</span>
      <div class="assets-typlic-number" id="shop_num"  style="font-size:2rem;color: #ff1e1e;margin: 0.3rem 6.5rem;float:left;text-align: center;"><span style='font-size:20px'>查询中……</span></div>
    
     
    </div>
    </div>
    <!-- <div class="assets-box-one">
      <div class="assets-title">集分宝</div>
      <div class="assets-typlic">可提领：<div class="assets-typlic-number" id="CanClaim"><span style='font-size:20px'>查询中……</span></div> <div class="typlic-button" tapmode onclick="openApply()">申请提领</div></div>
      <div style="clear:both;width: 90%;margin: auto;padding-left: 10px;padding-top:10px;">已提领总额:<span id="withdrawed_money">查询中……</span></div> -->
      <div   style="width: 90%;margin: auto;padding-left: 10px;padding-top:5px;display: none;">总资产:<span id="MyAssets">查询中……</span></div>
      <!-- <div style="width: 90%;margin: auto;padding-left: 10px;padding-top:5px;color:#ffbc8f"><u>提领记录></u></div>
    </div> -->
<!-- 
    <div class="assets-box-one">
      <div class="assets-title">客币</div>
      <div class="assets-typlic">余额：<div class="assets-typlic-number" id="integral"><span style='font-size:20px'>查询中……</span></div></div>
      <div style="clear:both;width: 90%;margin: auto;padding-left: 10px;padding-top:10px;">已提领总额:**</div>
      <div style="width: 90%;margin: auto;padding-left: 10px;padding-top:5px;color:#ffbc8f"><u>提领记录></u></div>
      <div class="assets-all-button">立即兑换</div>
    </div> -->
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript">
    apiready = function(){   
      
      if(!$api.getStorage('token')){
        location.href = './mine.html';
        return false;
      }
      var token = {
          token: $api.getStorage('token')
      };
      var myassets = $api.byId('MyAssets');
      var integral = $api.byId('integral');
      var withdrawed_money = $api.byId('withdrawed_money');
      var canclaim = $api.byId('CanClaim');
     
      api.ajax({
          url: 'http://www.mk517.com/webApi/mine.php',
          method: 'post',
          "headers": {
              "Content-Type": "application/json"
          },
          data: {
              body: token
          }
      }, function(ret, err) {
          if (ret) {
            canclaim.innerHTML = ret.CanClaim;
            myassets.innerHTML = ret.MyAssets;
            integral.innerHTML = ret.integral;
            shop_num.innerHTML = ret.order_count;
           
            withdrawed_money.innerHTML = ret.withdrawed_money;
          }
      });
      
      window.openApply = function() {
          var token = $api.getStorage('token');
          if(!token){
            api.toast({
              msg:'异常',
              duration:2000
            });
            return false;
          }
          api.openFrame({
              name: 'Apply',
              url: './Apply.html',
              rect: {
                  x: 0,
                  y: 0,
                  w: 'auto',
                  h: 'auto'
              },
              pageParam:{
                token:token
              },
              allowEdit: true
          });
      }



      window.opentrading_record = function() {
          var token = $api.getStorage('token');
          if(!token){
            api.toast({
              msg:'异常',
              duration:2000
            });
            return false;
          }
          api.openFrame({
              name: 'trading_record',
              url: './trading_record.html',
              rect: {
                  x: 0,
                  y: 0,
                  w: 'auto',
                  h: 'auto'
              },
              pageParam:{
                token:token
              },
              allowEdit: true
          });
      }


      window.opentrading_record1 = function() {
          var token = $api.getStorage('token');
          if(!token){
            api.toast({
              msg:'异常',
              duration:2000
            });
            return false;
          }
          api.openFrame({
              name: 'trading_record1',
              url: './trading_record1.html',
              rect: {
                  x: 0,
                  y: 0,
                  w: 'auto',
                  h: 'auto'
              },
              pageParam:{
                token:token
              },
              allowEdit: true
          });
      }
    }
  </script>
  </html>
